package com.yanqu.road.entity.activity.able;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_u_able_item")
public class UserAbleItem extends DataObject {

    @FieldTypeAnnotation(desc = "玩家ID", update = true, select = true)
    private long userId;
    @FieldTypeAnnotation(desc = "道具ID", update = true)
    private int goodsId;
    @FieldTypeAnnotation(desc = "数量")
    private long num;
    @FieldTypeAnnotation(desc = "修改时间")
    private long modifyTime;

    public UserAbleItem() {
    }

    public UserAbleItem(long userId, int goodsId, long num, long modifyTime) {
        this.userId = userId;
        this.goodsId = goodsId;
        this.num = num;
        this.modifyTime = modifyTime;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        if (this.goodsId != goodsId) {
            this.goodsId = goodsId;
            setUpdateOption();
        }
    }

    public long getNum() {
        return num;
    }

    public void setNum(long num) {
        if (this.num != num) {
            this.num = num;
            setUpdateOption();
        }
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        if (this.modifyTime != modifyTime) {
            this.modifyTime = modifyTime;
            setUpdateOption();
        }
    }

}
